inherited fmOld_Podotch: TfmOld_Podotch
  Left = 17
  Top = 192
  Width = 1259
  Height = 868
  Caption = #1042#1086#1089#1089#1090#1072#1085#1086#1074#1083#1077#1085#1080#1077' '#1087#1086#1076#1086#1090#1095#1077#1090#1086#1074
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  inherited sbBottom: TStatusBar
    Top = 807
    Width = 1251
  end
  inherited Panel1: TPanel
    Width = 1251
    Visible = False
    inherited BitBtn1: TBitBtn
      Left = 1081
    end
    inherited BitBtn2: TBitBtn
      Left = 1169
    end
  end
  object cxSplitter1: TcxSplitter [2]
    Left = 497
    Top = 45
    Width = 8
    Height = 762
    Control = Panel2
  end
  object Panel2: TPanel [3]
    Left = 0
    Top = 45
    Width = 497
    Height = 762
    Align = alLeft
    TabOrder = 3
    object ToolBar1: TToolBar
      Left = 1
      Top = 18
      Width = 495
      Height = 29
      Caption = 'ToolBar1'
      Images = DMInv.ilActive
      TabOrder = 0
      object ToolButton1: TToolButton
        Left = 0
        Top = 2
        Caption = 'ToolButton1'
        ImageIndex = 28
        OnClick = ToolButton1Click
      end
      object ToolButton2: TToolButton
        Left = 23
        Top = 2
        Caption = 'ToolButton2'
        ImageIndex = 29
        OnClick = ToolButton2Click
      end
      object ToolButton3: TToolButton
        Left = 46
        Top = 2
        Caption = 'ToolButton3'
        ImageIndex = 32
        Visible = False
        OnClick = ToolButton3Click
      end
    end
    object cxGrid1: TcxGrid
      Left = 1
      Top = 47
      Width = 495
      Height = 714
      Align = alClient
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
      TabOrder = 1
      LookAndFeel.Kind = lfStandard
      object tvPodotch: TcxGridDBTableView
        NavigatorButtons.ConfirmDelete = False
        NavigatorButtons.PriorPage.Visible = True
        NavigatorButtons.Next.Visible = True
        NavigatorButtons.Insert.Visible = True
        NavigatorButtons.Append.Visible = False
        NavigatorButtons.Edit.Visible = False
        NavigatorButtons.Post.Visible = True
        NavigatorButtons.Cancel.Visible = False
        NavigatorButtons.Refresh.Visible = False
        NavigatorButtons.SaveBookmark.Visible = False
        NavigatorButtons.GotoBookmark.Visible = False
        NavigatorButtons.Filter.Visible = False
        OnEditValueChanged = tvPodotchEditValueChanged
        DataController.DataSource = dsOP
        DataController.Summary.DefaultGroupSummaryItems = <>
        DataController.Summary.FooterSummaryItems = <
          item
            Format = '#,###0'
            Kind = skSum
            FieldName = 'OPSUMMA'
            Column = tvPodotchOPSUMMA
          end>
        DataController.Summary.SummaryGroups = <>
        OptionsBehavior.CellHints = True
        OptionsCustomize.ColumnFiltering = False
        OptionsData.Appending = True
        OptionsData.CancelOnExit = False
        OptionsView.CellEndEllipsis = True
        OptionsView.NoDataToDisplayInfoText = '<'#1053#1077#1090' '#1076#1072#1085#1085#1099#1093'>'
        OptionsView.CellAutoHeight = True
        OptionsView.CellTextMaxLineCount = 1
        OptionsView.ColumnAutoWidth = True
        OptionsView.Footer = True
        OptionsView.GroupByBox = False
        OptionsView.HeaderEndEllipsis = True
        OptionsView.Indicator = True
        Preview.Visible = True
        Styles.Header = DMInv.cxSiniyText
        object tvPodotchColumn1: TcxGridDBColumn
          Caption = #8470' '#1087'/'#1087
          OnGetDataText = tvPodotchColumn1GetDataText
          Options.Sorting = False
          Width = 40
        end
        object tvPodotchOPDATE: TcxGridDBColumn
          Caption = #1044#1072#1090#1072
          DataBinding.FieldName = 'OPDATE'
          Width = 90
        end
        object tvPodotchOPSDAL: TcxGridDBColumn
          Caption = #1057#1076#1072#1083
          DataBinding.FieldName = 'OPSDAL'
          PropertiesClassName = 'TcxLookupComboBoxProperties'
          Properties.KeyFieldNames = 'PPID'
          Properties.ListColumns = <
            item
              Caption = #1060#1048#1054
              FieldName = 'FIO'
            end>
          Properties.ListSource = dsPodotchLitso
          Width = 91
        end
        object tvPodotchOPPRINYAL: TcxGridDBColumn
          Caption = #1055#1088#1080#1085#1103#1083
          DataBinding.FieldName = 'OPPRINYAL'
          PropertiesClassName = 'TcxLookupComboBoxProperties'
          Properties.KeyFieldNames = 'PPID'
          Properties.ListColumns = <
            item
              Caption = #1060#1048#1054
              FieldName = 'FIO'
            end>
          Properties.ListSource = dsPodotchLitso
          Width = 91
        end
        object tvPodotchOPSUMMA: TcxGridDBColumn
          Caption = #1057#1091#1084#1084#1072
          DataBinding.FieldName = 'OPSUMMA'
          PropertiesClassName = 'TcxCalcEditProperties'
          Width = 167
        end
      end
      object cxGridLevel5: TcxGridLevel
        GridView = tvPodotch
      end
    end
    object cxLabel3: TcxLabel
      Left = 1
      Top = 1
      Align = alTop
      Caption = #1055#1086#1076#1086#1090#1095#1077#1090#1099
    end
  end
  object Panel3: TPanel [4]
    Left = 505
    Top = 45
    Width = 746
    Height = 762
    Align = alClient
    TabOrder = 4
    object ToolBar2: TToolBar
      Left = 1
      Top = 18
      Width = 744
      Height = 29
      Caption = 'ToolBar1'
      Images = DMInv.ilActive
      TabOrder = 0
      object ToolButton4: TToolButton
        Left = 0
        Top = 2
        Caption = 'ToolButton1'
        ImageIndex = 28
        OnClick = ToolButton4Click
      end
      object ToolButton5: TToolButton
        Left = 23
        Top = 2
        Caption = 'ToolButton2'
        ImageIndex = 29
        OnClick = ToolButton5Click
      end
      object ToolButton6: TToolButton
        Left = 46
        Top = 2
        Hint = #1054#1073#1085#1086#1074#1080#1090#1100' '#1089#1087#1080#1089#1086#1082' '#1087#1086#1083#1091#1095#1072#1090#1077#1083#1077#1081' '#1091#1089#1083#1091#1075
        Caption = 'ToolButton6'
        ImageIndex = 17
        ParentShowHint = False
        ShowHint = True
        OnClick = ToolButton6Click
      end
    end
    object cxSplitter2: TcxSplitter
      Left = 1
      Top = 545
      Width = 744
      Height = 8
      AlignSplitter = salTop
      Control = cxGrid3
      Visible = False
    end
    object cxLabel1: TcxLabel
      Left = 1
      Top = 1
      Align = alTop
      Caption = #1056#1072#1079#1085#1077#1089#1077#1085#1080#1077' '#1087#1086#1076#1086#1090#1095#1077#1090#1072
    end
    object cxLabel2: TcxLabel
      Left = 1
      Top = 553
      Align = alTop
      Caption = #1055#1088#1080#1074#1103#1079#1072#1085#1085#1099#1077' '#1087#1083#1072#1090#1077#1078#1080' '#1082' '#1087#1086#1083#1091#1095#1072#1090#1077#1083#1102' '#1091#1089#1083#1091#1075
      Visible = False
    end
    object Panel4: TPanel
      Left = 1
      Top = 570
      Width = 744
      Height = 191
      Align = alClient
      Caption = 'Panel4'
      TabOrder = 4
      Visible = False
      object Panel14: TPanel
        Left = 1
        Top = 1
        Width = 742
        Height = 34
        Align = alTop
        TabOrder = 0
        object cxRadioGroup1: TcxRadioGroup
          Left = 6
          Top = -3
          Properties.Columns = 2
          Properties.Items = <
            item
              Caption = #1055#1088#1072#1074#1080#1083#1100#1085#1099#1077' '#1087#1083#1072#1090#1077#1078#1080
              Value = 0
            end
            item
              Caption = #1059#1076#1072#1083#1077#1085#1085#1099#1077' '#1087#1083#1072#1090#1077#1078#1080
              Value = 1
            end>
          Properties.OnChange = cxRadioGroup1PropertiesChange
          ItemIndex = 0
          TabOrder = 0
          Height = 33
          Width = 314
        end
        object bAddCommon: TcxButton
          Tag = 12
          Left = 326
          Top = 3
          Width = 31
          Height = 27
          Hint = #1044#1086#1073#1072#1074#1080#1090#1100' '#1087#1083#1072#1090#1077#1078
          ParentShowHint = False
          ShowHint = True
          TabOrder = 1
          TabStop = False
          OnClick = bAddCommonClick
          Glyph.Data = {
            76010000424D7601000000000000760000002800000020000000100000000100
            04000000000000010000CE0E0000D80E00001000000000000000000000000000
            80000080000000808000800000008000800080800000C0C0C000808080000000
            FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
            3333333333387F3333333333333333333333333333387F333333333333344333
            3333333333387F3333333333333443333333333333387F333333333333344333
            3333333333387F3333333333333443333333333333387F333333333333344333
            3333387FFFFFFFFFFFFF3344444444444433387777777F777777334444444444
            4433388888887F8888883333333443333333333333387F333333333333344333
            3333333333387F3333333333333443333333333333387F333333333333344333
            3333333333387F33333333333334433333333333333877333333333333333333
            3333333333388833333333333333333333333333333333333333}
          LookAndFeel.SkinName = ''
          NumGlyphs = 2
        end
        object bDelCommon: TcxButton
          Tag = 12
          Left = 361
          Top = 3
          Width = 30
          Height = 27
          Hint = #1059#1076#1072#1083#1080#1090#1100' '#1087#1083#1072#1090#1077#1078
          ParentShowHint = False
          ShowHint = True
          TabOrder = 2
          TabStop = False
          OnClick = bDelCommonClick
          Glyph.Data = {
            76010000424D7601000000000000760000002800000020000000100000000100
            0400000000000001000000000000000000001000000000000000000000000000
            8000008000000080800080000000800080008080000080808000C0C0C0000000
            FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
            3333333333333333333333333333333333333333333333333333333333333333
            3333333333333333333333337333333333333333F33333333333333313333333
            333333337F33333333333333113333713333333377F33377F333333371733717
            3333333377F3377F333333333117311333333333377F377F3333333337111133
            33333333337777F33333333337111333333333333F777F333333333371111733
            3333333337777F3333333333117311733333333377F377F33333333333333117
            333333333333377F33333333333333117333333333333377F333333333333333
            3333333333333333333333333333333333333333333333333333}
          LookAndFeel.SkinName = ''
          NumGlyphs = 2
        end
      end
      object cxGrid2: TcxGrid
        Left = 1
        Top = 35
        Width = 584
        Height = 155
        Align = alLeft
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -13
        Font.Name = 'Tahoma'
        Font.Style = []
        ParentFont = False
        TabOrder = 1
        LookAndFeel.Kind = lfStandard
        object cxGridDBTableView1: TcxGridDBTableView
          NavigatorButtons.ConfirmDelete = False
          OnEditValueChanged = tvPodotchEditValueChanged
          DataController.DataSource = dsCommon
          DataController.Summary.DefaultGroupSummaryItems = <>
          DataController.Summary.FooterSummaryItems = <
            item
              Format = '#,###0'
              Kind = skSum
              FieldName = 'CSAMOUNT'
              Column = tvPlatCSAMOUNT
            end>
          DataController.Summary.SummaryGroups = <>
          OptionsBehavior.CellHints = True
          OptionsCustomize.ColumnFiltering = False
          OptionsData.CancelOnExit = False
          OptionsData.Deleting = False
          OptionsData.DeletingConfirmation = False
          OptionsData.Editing = False
          OptionsData.Inserting = False
          OptionsView.CellEndEllipsis = True
          OptionsView.NoDataToDisplayInfoText = '<'#1053#1077#1090' '#1076#1072#1085#1085#1099#1093'>'
          OptionsView.CellAutoHeight = True
          OptionsView.CellTextMaxLineCount = 1
          OptionsView.ColumnAutoWidth = True
          OptionsView.Footer = True
          OptionsView.GroupByBox = False
          OptionsView.HeaderEndEllipsis = True
          Preview.Visible = True
          Styles.Header = DMInv.cxSiniyText
          object tvPlatPP: TcxGridDBColumn
            Caption = #1055#1083#1072#1090#1077#1083#1100#1097#1080#1082
            DataBinding.FieldName = 'PP'
            Options.Editing = False
            Width = 96
          end
          object tvPlatCSAMOUNT: TcxGridDBColumn
            Caption = #1057#1091#1084#1084#1072
            DataBinding.FieldName = 'CSAMOUNT'
            Options.Editing = False
            Width = 51
          end
          object tvPlatCSFORM: TcxGridDBColumn
            Caption = #1053#1072#1083'.'
            DataBinding.FieldName = 'CSFORM'
            PropertiesClassName = 'TcxCheckBoxProperties'
            Properties.ValueChecked = 0
            Properties.ValueUnchecked = 1
            Options.Editing = False
            Width = 40
          end
          object tvPlatCSDATE: TcxGridDBColumn
            Caption = #1044#1072#1090#1072' '#1086#1087#1083#1072#1090#1099
            DataBinding.FieldName = 'CSDATE'
            Options.Editing = False
            Width = 100
          end
          object tvPlatCSFORWHAT: TcxGridDBColumn
            Caption = #1047#1072' '#1095#1090#1086'?'
            DataBinding.FieldName = 'CSFORWHAT'
            Options.Editing = False
            Width = 60
          end
          object tvPlatCSNOTE: TcxGridDBColumn
            Caption = #1050#1086#1084#1084#1077#1085#1090#1072#1088#1080#1081
            DataBinding.FieldName = 'CSNOTE'
            Options.Editing = False
            Width = 100
          end
          object tvPlatAUTOR: TcxGridDBColumn
            Caption = #1040#1074#1090#1086#1088
            DataBinding.FieldName = 'AUTOR'
            Options.Editing = False
            Width = 50
          end
          object tvPlatPP_USERMONEY: TcxGridDBColumn
            Caption = #1050#1090#1086' '#1087#1088#1080#1085#1103#1083
            DataBinding.FieldName = 'PP_USERMONEY'
            Options.Editing = False
            Width = 88
          end
          object tvPlatCSTIMEENTER: TcxGridDBColumn
            Caption = #1042#1088#1077#1084#1103' '#1074#1074#1086#1076#1072
            DataBinding.FieldName = 'CSTIMEENTER'
            Options.Editing = False
            Width = 70
          end
        end
        object cxGridLevel1: TcxGridLevel
          GridView = cxGridDBTableView1
        end
      end
      object cxSplitter3: TcxSplitter
        Left = 585
        Top = 35
        Width = 8
        Height = 155
        Control = cxGrid2
      end
      object cxGrid6: TcxGrid
        Left = 593
        Top = 35
        Width = 150
        Height = 155
        Align = alClient
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -13
        Font.Name = 'Tahoma'
        Font.Style = []
        ParentFont = False
        TabOrder = 3
        LookAndFeel.Kind = lfStandard
        object cxGridDBTableView6: TcxGridDBTableView
          NavigatorButtons.ConfirmDelete = False
          OnEditValueChanged = tvPodotchEditValueChanged
          DataController.DataSource = dsComRaznes
          DataController.Summary.DefaultGroupSummaryItems = <>
          DataController.Summary.FooterSummaryItems = <
            item
              Format = '#,###0'
              Kind = skSum
              FieldName = 'CAMOUNT'
              Column = cxGridDBTableView6CAMOUNT
            end>
          DataController.Summary.SummaryGroups = <>
          OptionsBehavior.CellHints = True
          OptionsCustomize.ColumnFiltering = False
          OptionsData.CancelOnExit = False
          OptionsData.Deleting = False
          OptionsData.DeletingConfirmation = False
          OptionsData.Editing = False
          OptionsData.Inserting = False
          OptionsView.CellEndEllipsis = True
          OptionsView.NoDataToDisplayInfoText = '<'#1053#1077#1090' '#1076#1072#1085#1085#1099#1093'>'
          OptionsView.CellAutoHeight = True
          OptionsView.CellTextMaxLineCount = 1
          OptionsView.ColumnAutoWidth = True
          OptionsView.Footer = True
          OptionsView.GroupByBox = False
          OptionsView.HeaderEndEllipsis = True
          Preview.Visible = True
          Styles.Header = DMInv.cxSiniyText
          object cxGridDBTableView6STNAME: TcxGridDBColumn
            Caption = #1059#1089#1083#1091#1075#1072
            DataBinding.FieldName = 'STNAME'
            Width = 525
          end
          object cxGridDBTableView6CAMOUNT: TcxGridDBColumn
            Caption = #1057#1091#1084#1084#1072
            DataBinding.FieldName = 'CAMOUNT'
            Width = 157
          end
        end
        object cxGridLevel8: TcxGridLevel
          GridView = cxGridDBTableView6
        end
      end
    end
    object cxGrid3: TcxGrid
      Left = 1
      Top = 47
      Width = 744
      Height = 498
      Align = alTop
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
      TabOrder = 5
      LookAndFeel.Kind = lfStandard
      object tvPlat: TcxGridDBTableView
        NavigatorButtons.ConfirmDelete = False
        NavigatorButtons.PriorPage.Visible = True
        NavigatorButtons.Next.Visible = True
        NavigatorButtons.Insert.Visible = True
        NavigatorButtons.Append.Visible = False
        NavigatorButtons.Edit.Visible = False
        NavigatorButtons.Post.Visible = True
        NavigatorButtons.Cancel.Visible = False
        NavigatorButtons.Refresh.Visible = False
        NavigatorButtons.SaveBookmark.Visible = False
        NavigatorButtons.GotoBookmark.Visible = False
        NavigatorButtons.Filter.Visible = False
        OnEditValueChanged = tvPlatEditValueChanged
        DataController.DataSource = dlgDS
        DataController.Summary.DefaultGroupSummaryItems = <>
        DataController.Summary.FooterSummaryItems = <
          item
            Format = '#,###0'
            Kind = skSum
            FieldName = 'OPRPRIHOD'
            Column = tvPlatOPRPRIHOD
          end
          item
            Format = '#,###0'
            Kind = skSum
            FieldName = 'OPRRASHOD'
            Column = tvPlatOPRRASHOD
          end>
        DataController.Summary.SummaryGroups = <>
        OptionsBehavior.CellHints = True
        OptionsCustomize.ColumnFiltering = False
        OptionsData.Appending = True
        OptionsData.CancelOnExit = False
        OptionsView.CellEndEllipsis = True
        OptionsView.NoDataToDisplayInfoText = '<'#1053#1077#1090' '#1076#1072#1085#1085#1099#1093'>'
        OptionsView.CellAutoHeight = True
        OptionsView.CellTextMaxLineCount = 1
        OptionsView.ColumnAutoWidth = True
        OptionsView.Footer = True
        OptionsView.GroupByBox = False
        OptionsView.HeaderEndEllipsis = True
        OptionsView.Indicator = True
        Preview.Visible = True
        Styles.Header = DMInv.cxSiniyText
        object tvPlatColumn1: TcxGridDBColumn
          Caption = #8470' '#1087'/'#1087
          OnGetDataText = tvPlatColumn1GetDataText
          Options.Sorting = False
          Width = 39
        end
        object tvPlatOPRDATE: TcxGridDBColumn
          Caption = #1044#1072#1090#1072
          DataBinding.FieldName = 'OPRDATE'
          Width = 93
        end
        object tvPlatPID_POLUCH: TcxGridDBColumn
          Caption = #1055#1086#1083#1091#1095'. '#1091#1089#1083#1091#1075
          DataBinding.FieldName = 'PID_POLUCH'
          PropertiesClassName = 'TcxLookupComboBoxProperties'
          Properties.DropDownRows = 15
          Properties.KeyFieldNames = 'PID'
          Properties.ListColumns = <
            item
              Caption = #1060#1048#1054
              FieldName = 'PP'
            end
            item
              Caption = #1044#1072#1090#1072' '#1088#1086#1078#1076'.'
              Fixed = True
              FieldName = 'PDATEBIRTH'
            end
            item
              Caption = #1054#1073#1088#1072#1079'. '#1087#1086#1076#1088'.'
              FieldName = 'PODR'
            end>
          Properties.ListSource = dsPoluchUslug
          Width = 395
        end
        object tvPlatOPRNOTE: TcxGridDBColumn
          Caption = #1050#1086#1084#1084#1077#1085#1090#1072#1088#1080#1081
          DataBinding.FieldName = 'OPRNOTE'
          Width = 95
        end
        object tvPlatOPRPRIHOD: TcxGridDBColumn
          Caption = #1055#1088#1080#1093#1086#1076
          DataBinding.FieldName = 'OPRPRIHOD'
          Width = 66
        end
        object tvPlatOPRRASHOD: TcxGridDBColumn
          Caption = #1056#1072#1089#1093#1086#1076
          DataBinding.FieldName = 'OPRRASHOD'
          Width = 40
        end
      end
      object cxGridLevel2: TcxGridLevel
        GridView = tvPlat
      end
    end
  end
  inherited dlgDS: TDataSource
    DataSet = qOPR
    OnDataChange = dlgDSDataChange
    Left = 608
    Top = 152
  end
  object qOP: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    AfterPost = qOPAfterPost
    CachedUpdates = True
    SQL.Strings = (
      'SELECT OP.*'
      'FROM OLD_PODOTCH OP')
    UpdateObject = quOP
    GeneratorField.Field = 'OPID'
    GeneratorField.Generator = 'GEN_OLD_PODOTCH_ID'
    Left = 208
    Top = 56
    object qOPOPID: TIntegerField
      FieldName = 'OPID'
      Origin = '"OLD_PODOTCH"."OPID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qOPOPDATE: TDateField
      FieldName = 'OPDATE'
      Origin = '"OLD_PODOTCH"."OPDATE"'
    end
    object qOPOPSDAL: TIntegerField
      FieldName = 'OPSDAL'
      Origin = '"OLD_PODOTCH"."OPSDAL"'
    end
    object qOPOPPRINYAL: TIntegerField
      FieldName = 'OPPRINYAL'
      Origin = '"OLD_PODOTCH"."OPPRINYAL"'
    end
    object qOPOPSUMMA: TIBBCDField
      FieldName = 'OPSUMMA'
      Origin = '"OLD_PODOTCH"."OPSUMMA"'
      DisplayFormat = '#,###0.00'
      EditFormat = '0.00'
      Precision = 18
      Size = 2
    end
    object qOPOPUSERENTER: TIBStringField
      FieldName = 'OPUSERENTER'
      Origin = '"OLD_PODOTCH"."OPUSERENTER"'
      Size = 40
    end
    object qOPOPTIMEENTER: TDateTimeField
      FieldName = 'OPTIMEENTER'
      Origin = '"OLD_PODOTCH"."OPTIMEENTER"'
    end
    object qOPOPUSEREDIT: TIBStringField
      FieldName = 'OPUSEREDIT'
      Origin = '"OLD_PODOTCH"."OPUSEREDIT"'
      Size = 40
    end
    object qOPOPTIMEDIT: TDateTimeField
      FieldName = 'OPTIMEDIT'
      Origin = '"OLD_PODOTCH"."OPTIMEDIT"'
    end
  end
  object quOP: TIBUpdateSQL
    RefreshSQL.Strings = (
      'Select '
      '  OPID,'
      '  OPDATE,'
      '  OPSDAL,'
      '  OPPRINYAL,'
      '  OPSUMMA,'
      '  OPUSERENTER,'
      '  OPTIMEENTER,'
      '  OPUSEREDIT,'
      '  OPTIMEDIT'
      'from OLD_PODOTCH '
      'where'
      '  OPID = :OPID')
    ModifySQL.Strings = (
      'update OLD_PODOTCH'
      'set'
      '  OPDATE = :OPDATE,'
      '  OPID = :OPID,'
      '  OPPRINYAL = :OPPRINYAL,'
      '  OPSDAL = :OPSDAL,'
      '  OPSUMMA = :OPSUMMA,'
      '  OPTIMEDIT = :OPTIMEDIT,'
      '  OPTIMEENTER = :OPTIMEENTER,'
      '  OPUSEREDIT = :OPUSEREDIT,'
      '  OPUSERENTER = :OPUSERENTER'
      'where'
      '  OPID = :OLD_OPID')
    InsertSQL.Strings = (
      'insert into OLD_PODOTCH'
      
        '  (OPDATE, OPID, OPPRINYAL, OPSDAL, OPSUMMA, OPTIMEDIT, OPTIMEEN' +
        'TER, OPUSEREDIT, '
      '   OPUSERENTER)'
      'values'
      
        '  (:OPDATE, :OPID, :OPPRINYAL, :OPSDAL, :OPSUMMA, :OPTIMEDIT, :O' +
        'PTIMEENTER, '
      '   :OPUSEREDIT, :OPUSERENTER)')
    DeleteSQL.Strings = (
      'delete from OLD_PODOTCH'
      'where'
      '  OPID = :OLD_OPID')
    Left = 248
    Top = 56
  end
  object dsOP: TDataSource
    DataSet = qOP
    OnDataChange = dsOPDataChange
    Left = 168
    Top = 56
  end
  object qPodotchLitso: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      
        'SELECT PP.PPID, P.PLASTNAME||'#39' '#39'||SUBSTRING(P.PNAME FROM 1 FOR 1' +
        ' )||'#39'. '#39'||'
      
        '        COALESCE(SUBSTRING(P.PPATRONYMIC FROM 1 FOR 1)||'#39'.'#39','#39' '#39')' +
        ' AS fio'
      'FROM  PERSON_PODOTCH PP'
      'INNER JOIN PEOPLE P ON P.PID = PP.PP_ID'
      'WHERE PP.PPTYPE = 4')
    GeneratorField.Field = 'RPID'
    Left = 248
    Top = 101
    object qPodotchLitsoPPID: TIntegerField
      FieldName = 'PPID'
      Origin = '"PERSON_PODOTCH"."PPID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qPodotchLitsoFIO: TIBStringField
      FieldName = 'FIO'
      ProviderFlags = []
      Size = 769
    end
  end
  object dsPodotchLitso: TDataSource
    DataSet = qPodotchLitso
    Left = 216
    Top = 101
  end
  object qOPR: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    AfterInsert = qOPRAfterInsert
    AfterPost = qOPRAfterPost
    CachedUpdates = True
    DataSource = dsOP
    SQL.Strings = (
      'SELECT OPR.*'
      'FROM OP_RAZNESENIE OPR'
      'WHERE OPR.OPID = :OPID')
    UpdateObject = quOPR
    GeneratorField.Field = 'OPRID'
    GeneratorField.Generator = 'GEN_OLD_PODOTCH_ID'
    Left = 640
    Top = 152
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'OPID'
        ParamType = ptUnknown
      end>
    object qOPROPRID: TIntegerField
      FieldName = 'OPRID'
      Origin = '"OP_RAZNESENIE"."OPRID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qOPROPID: TIntegerField
      FieldName = 'OPID'
      Origin = '"OP_RAZNESENIE"."OPID"'
    end
    object qOPROPRDATE: TDateField
      FieldName = 'OPRDATE'
      Origin = '"OP_RAZNESENIE"."OPRDATE"'
    end
    object qOPROPRNOTE: TIBStringField
      FieldName = 'OPRNOTE'
      Origin = '"OP_RAZNESENIE"."OPRNOTE"'
      Size = 2048
    end
    object qOPROPRPRIHOD: TIBBCDField
      FieldName = 'OPRPRIHOD'
      Origin = '"OP_RAZNESENIE"."OPRPRIHOD"'
      DisplayFormat = '#,###0.00'
      EditFormat = '0.00'
      Precision = 18
      Size = 2
    end
    object qOPROPRRASHOD: TIBBCDField
      FieldName = 'OPRRASHOD'
      Origin = '"OP_RAZNESENIE"."OPRRASHOD"'
      DisplayFormat = '#,###0.00'
      EditFormat = '0.00'
      Precision = 18
      Size = 2
    end
    object qOPROPRUSERENTER: TIBStringField
      FieldName = 'OPRUSERENTER'
      Origin = '"OP_RAZNESENIE"."OPRUSERENTER"'
      Size = 40
    end
    object qOPROPRTIMEENTER: TDateTimeField
      FieldName = 'OPRTIMEENTER'
      Origin = '"OP_RAZNESENIE"."OPRTIMEENTER"'
    end
    object qOPROPRUSEREDIT: TIBStringField
      FieldName = 'OPRUSEREDIT'
      Origin = '"OP_RAZNESENIE"."OPRUSEREDIT"'
      Size = 40
    end
    object qOPROPRTIMEEDIT: TDateTimeField
      FieldName = 'OPRTIMEEDIT'
      Origin = '"OP_RAZNESENIE"."OPRTIMEEDIT"'
    end
    object qOPRPID_POLUCH: TIntegerField
      FieldName = 'PID_POLUCH'
      Origin = '"OP_RAZNESENIE"."PID_POLUCH"'
    end
    object qOPRCSID: TIntegerField
      FieldName = 'CSID'
      Origin = '"OP_RAZNESENIE"."CSID"'
    end
  end
  object quOPR: TIBUpdateSQL
    RefreshSQL.Strings = (
      'Select '
      '  OPRID,'
      '  OPID,'
      '  OPRDATE,'
      '  OPRNOTE,'
      '  OPRPRIHOD,'
      '  OPRRASHOD,'
      '  OPRUSERENTER,'
      '  OPRTIMEENTER,'
      '  OPRUSEREDIT,'
      '  OPRTIMEEDIT,'
      '  PID_POLUCH,'
      '  CSID'
      'from OP_RAZNESENIE '
      'where'
      '  OPRID = :OPRID')
    ModifySQL.Strings = (
      'update OP_RAZNESENIE'
      'set'
      '  OPID = :OPID,'
      '  OPRDATE = :OPRDATE,'
      '  OPRNOTE = :OPRNOTE,'
      '  OPRPRIHOD = :OPRPRIHOD,'
      '  OPRRASHOD = :OPRRASHOD,'
      '  PID_POLUCH = :PID_POLUCH'
      'where'
      '  OPRID = :OLD_OPRID')
    InsertSQL.Strings = (
      'insert into OP_RAZNESENIE'
      
        '  (CSID, OPID, OPRDATE, OPRID, OPRNOTE, OPRPRIHOD, OPRRASHOD, OP' +
        'RTIMEEDIT, '
      '   OPRTIMEENTER, OPRUSEREDIT, OPRUSERENTER, PID_POLUCH)'
      'values'
      
        '  (:CSID, :OPID, :OPRDATE, :OPRID, :OPRNOTE, :OPRPRIHOD, :OPRRAS' +
        'HOD, :OPRTIMEEDIT, '
      '   :OPRTIMEENTER, :OPRUSEREDIT, :OPRUSERENTER, :PID_POLUCH)')
    DeleteSQL.Strings = (
      'delete from OP_RAZNESENIE'
      'where'
      '  OPRID = :OLD_OPRID')
    Left = 664
    Top = 152
  end
  object dsPoluchUslug: TDataSource
    DataSet = qPoluchUslug
    Left = 624
    Top = 237
  end
  object qPoluchUslug: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      
        'SELECT P.PID, (COALESCE(P.PLASTNAME,'#39' '#39')||'#39' '#39'||COALESCE(P.PNAME,' +
        #39' '#39')||'#39' '#39'||COALESCE(P.PPATRONYMIC,'#39' '#39')) AS PP,'
      '    SD.SDNAME, sd1.SDNAME AS podr, P.PDATEBIRTH'
      'FROM PEOPLE P'
      'LEFT OUTER JOIN P_STATUS PS ON PS.PID = P.PID'
      
        'LEFT OUTER JOIN DETI_PODRAZD DP ON DP.PID = P.PID AND CURRENT_DA' +
        'TE BETWEEN CAST(dp.DPDATEIN AS DATE) AND COALESCE(CAST(dp.DPDATE' +
        'OUT AS DATE), CURRENT_DATE+3650)'
      'LEFT OUTER JOIN SYS_DIC SD1 ON SD1.SDID = DP.SDID'
      'LEFT OUTER JOIN SYS_DIC SD ON SD.SDID = PS.SDID'
      'WHERE P.PISDELETE IS NULL'
      '    AND PS.SDID in (1246, 1801) '
      'ORDER BY 2')
    Left = 664
    Top = 237
    object qPoluchUslugPID: TIntegerField
      FieldName = 'PID'
      Origin = '"PEOPLE"."PID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qPoluchUslugPP: TIBStringField
      FieldName = 'PP'
      ProviderFlags = []
      Size = 767
    end
    object qPoluchUslugSDNAME: TIBStringField
      FieldName = 'SDNAME'
      Origin = '"SYS_DIC"."SDNAME"'
      Size = 255
    end
    object qPoluchUslugPODR: TIBStringField
      FieldName = 'PODR'
      Origin = '"SYS_DIC"."SDNAME"'
      Size = 255
    end
    object qPoluchUslugPDATEBIRTH: TDateField
      FieldName = 'PDATEBIRTH'
      Origin = '"PEOPLE"."PDATEBIRTH"'
    end
  end
  object dsCommon: TDataSource
    DataSet = qCommon
    Left = 544
    Top = 440
  end
  object qCommon: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    CachedUpdates = True
    DataSource = dlgDS
    SQL.Strings = (
      
        'SELECT CS.* , (COALESCE(P.PLASTNAME,'#39' '#39')||'#39' '#39'||COALESCE(P.PNAME,' +
        #39' '#39')||'#39' '#39'||COALESCE(P.PPATRONYMIC,'#39' '#39')) AS PP,'
      'p1.PLASTNAME||'#39' '#39'||SUBSTRING(p1.PNAME FROM 1 FOR 1 )||'#39'. '#39'||'
      
        'COALESCE(SUBSTRING(p1.PPATRONYMIC FROM 1 FOR 1)||'#39'.'#39','#39' '#39') AS aut' +
        'or,'
      
        '(COALESCE(P_poluch.PLASTNAME,'#39' '#39')||'#39' '#39'||COALESCE(P_poluch.PNAME,' +
        #39' '#39')||'#39' '#39'||COALESCE(P_poluch.PPATRONYMIC,'#39' '#39')) AS PP_poluch,'
      'P_poluch.PDATEBIRTH, P1.PID as pid_user,'
      
        'IIF (CS.CSUSERMONEY IS NOT NULL,(p2.PLASTNAME||'#39' '#39'||SUBSTRING(p2' +
        '.PNAME FROM 1 FOR 1 )||'#39'. '#39'||'
      
        'COALESCE(SUBSTRING(p2.PPATRONYMIC FROM 1 FOR 1)||'#39'.'#39','#39' '#39')),(p1.P' +
        'LASTNAME||'#39' '#39'||SUBSTRING(p1.PNAME FROM 1 FOR 1 )||'#39'. '#39'||'
      
        'COALESCE(SUBSTRING(p1.PPATRONYMIC FROM 1 FOR 1)||'#39'.'#39','#39' '#39'))) AS p' +
        'p_USERMONEY'
      'FROM COMMON_SERV CS'
      'LEFT OUTER JOIN PEOPLE_COMMON PC ON PC.CSID = CS.CSID'
      'LEFT OUTER JOIN PEOPLE P ON P.PID = PC.PID'
      'LEFT OUTER JOIN USERS U ON U.USNAME = CS.CSUSERENTER'
      'LEFT OUTER JOIN PEOPLE P1 ON P1.PID = U.PID'
      'LEFT OUTER JOIN PEOPLE P2 ON P2.PID = CS.CSUSERMONEY'
      'LEFT OUTER JOIN PEOPLE P_poluch ON P_poluch.PID = CS.PID_POLUCH'
      'WHERE CS.CSISDELETE IS NULL'
      'order by CS.CSID')
    UpdateObject = quCommon
    GeneratorField.Field = 'CSID'
    GeneratorField.Generator = 'GEN_COMMON_SERV_ID'
    Left = 584
    Top = 440
    object qCommonCSID: TIntegerField
      FieldName = 'CSID'
      Origin = '"COMMON_SERV"."CSID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qCommonPID_POLUCH: TIntegerField
      FieldName = 'PID_POLUCH'
      Origin = '"COMMON_SERV"."PID_POLUCH"'
    end
    object qCommonCSFORM: TIntegerField
      FieldName = 'CSFORM'
      Origin = '"COMMON_SERV"."CSFORM"'
    end
    object qCommonCSAMOUNT: TIBBCDField
      FieldName = 'CSAMOUNT'
      Origin = '"COMMON_SERV"."CSAMOUNT"'
      DisplayFormat = '#,###'
      EditFormat = '0.00'
      Precision = 18
      Size = 2
    end
    object qCommonCSDATE: TDateField
      FieldName = 'CSDATE'
      Origin = '"COMMON_SERV"."CSDATE"'
    end
    object qCommonCSFORWHAT: TIBStringField
      FieldName = 'CSFORWHAT'
      Origin = '"COMMON_SERV"."CSFORWHAT"'
      Size = 255
    end
    object qCommonCSNOTE: TIBStringField
      FieldName = 'CSNOTE'
      Origin = '"COMMON_SERV"."CSNOTE"'
      Size = 255
    end
    object qCommonCSUSERENTER: TIBStringField
      FieldName = 'CSUSERENTER'
      Origin = '"COMMON_SERV"."CSUSERENTER"'
      Size = 40
    end
    object qCommonCSTIMEENTER: TDateTimeField
      FieldName = 'CSTIMEENTER'
      Origin = '"COMMON_SERV"."CSTIMEENTER"'
    end
    object qCommonCSUSEREDIT: TIBStringField
      FieldName = 'CSUSEREDIT'
      Origin = '"COMMON_SERV"."CSUSEREDIT"'
      Size = 40
    end
    object qCommonCSTIMEEDIT: TDateTimeField
      FieldName = 'CSTIMEEDIT'
      Origin = '"COMMON_SERV"."CSTIMEEDIT"'
    end
    object qCommonPID: TIntegerField
      FieldName = 'PID'
      Origin = '"COMMON_SERV"."PID"'
    end
    object qCommonAUTOR: TIBStringField
      FieldName = 'AUTOR'
      ProviderFlags = []
      Size = 769
    end
    object qCommonPP: TIBStringField
      FieldName = 'PP'
      ProviderFlags = []
      Size = 767
    end
    object qCommonCSISDELETE: TIntegerField
      FieldName = 'CSISDELETE'
      Origin = '"COMMON_SERV"."CSISDELETE"'
    end
    object qCommonCSDELETENOTE: TIBStringField
      FieldName = 'CSDELETENOTE'
      Origin = '"COMMON_SERV"."CSDELETENOTE"'
      Size = 255
    end
    object qCommonCSNUMUSER: TIntegerField
      FieldName = 'CSNUMUSER'
      Origin = '"COMMON_SERV"."CSNUMUSER"'
    end
    object qCommonPP_POLUCH: TIBStringField
      FieldName = 'PP_POLUCH'
      ProviderFlags = []
      Size = 767
    end
    object qCommonPDATEBIRTH: TDateField
      FieldName = 'PDATEBIRTH'
      Origin = '"PEOPLE"."PDATEBIRTH"'
    end
    object qCommonPID_USER: TIntegerField
      FieldName = 'PID_USER'
      Origin = '"PEOPLE"."PID"'
    end
    object qCommonJLID: TIntegerField
      FieldName = 'JLID'
      Origin = '"COMMON_SERV"."JLID"'
    end
    object qCommonCSUSERMONEY: TIntegerField
      FieldName = 'CSUSERMONEY'
      Origin = '"COMMON_SERV"."CSUSERMONEY"'
    end
    object qCommonPP_USERMONEY: TIBStringField
      FieldName = 'PP_USERMONEY'
      ProviderFlags = []
      Size = 769
    end
  end
  object quCommon: TIBUpdateSQL
    RefreshSQL.Strings = (
      'Select '
      '  CSID,'
      '  PID_POLUCH,'
      '  CSFORM,'
      '  CSAMOUNT,'
      '  CSDATE,'
      '  PID,'
      '  CSFORWHAT,'
      '  CSNOTE,'
      '  CSUSERENTER,'
      '  CSTIMEENTER,'
      '  CSUSEREDIT,'
      '  CSTIMEEDIT,'
      '  CSISDELETE,'
      '  CSDELETENOTE,'
      '  CSNUMUSER,'
      '  JLID,'
      '  CSUSERMONEY,'
      '  PP,'
      '  AUTOR,'
      '  PP_POLUCH,'
      '  PDATEBIRTH,'
      '  PID_USER,'
      '  PP_USERMONEY'
      'from COMMON_SERV '
      'where'
      '  CSID = :CSID')
    ModifySQL.Strings = (
      'update COMMON_SERV'
      'set'
      '  CSAMOUNT = :CSAMOUNT,'
      '  CSDATE = :CSDATE,'
      '  CSDELETENOTE = :CSDELETENOTE,'
      '  CSFORM = :CSFORM,'
      '  CSFORWHAT = :CSFORWHAT,'
      '  CSID = :CSID,'
      '  CSISDELETE = :CSISDELETE,'
      '  CSNOTE = :CSNOTE,'
      '  CSNUMUSER = :CSNUMUSER,'
      '  CSTIMEEDIT = :CSTIMEEDIT,'
      '  CSTIMEENTER = :CSTIMEENTER,'
      '  CSUSEREDIT = :CSUSEREDIT,'
      '  CSUSERENTER = :CSUSERENTER,'
      '  CSUSERMONEY = :CSUSERMONEY,'
      '  JLID = :JLID,'
      '  PID = :PID,'
      '  PID_POLUCH = :PID_POLUCH'
      'where'
      '  CSID = :OLD_CSID')
    InsertSQL.Strings = (
      'insert into COMMON_SERV'
      
        '  (CSAMOUNT, CSDATE, CSDELETENOTE, CSFORM, CSFORWHAT, CSID, CSIS' +
        'DELETE, '
      
        '   CSNOTE, CSNUMUSER, CSTIMEEDIT, CSTIMEENTER, CSUSEREDIT, CSUSE' +
        'RENTER, '
      '   CSUSERMONEY, JLID, PID, PID_POLUCH)'
      'values'
      
        '  (:CSAMOUNT, :CSDATE, :CSDELETENOTE, :CSFORM, :CSFORWHAT, :CSID' +
        ', :CSISDELETE, '
      
        '   :CSNOTE, :CSNUMUSER, :CSTIMEEDIT, :CSTIMEENTER, :CSUSEREDIT, ' +
        ':CSUSERENTER, '
      '   :CSUSERMONEY, :JLID, :PID, :PID_POLUCH)')
    DeleteSQL.Strings = (
      'null;')
    Left = 619
    Top = 440
  end
  object qComRaznes: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    DataSource = dsCommon
    SQL.Strings = (
      'SELECT C.CAMOUNT,  ST.STNAME'
      'FROM COMMON C'
      'INNER JOIN SERVICES S ON S.SCID = C.SCID'
      'INNER JOIN SERVICES_TYPE ST ON ST.STID = S.STID'
      'WHERE C.CSID = :CSID AND C.CTYPE = 1'
      'UNION'
      
        'SELECT C.CAMOUNT,  '#39' '#1055#1083#1072#1090#1072' '#1079#1072' '#1087#1077#1088#1077#1095#1080#1089#1083#1077#1085#1080#1077' '#1076#1077#1085#1077#1075' '#1085#1072' '#1088'/'#1089' '#1086#1073#1088#1072#1079#1086#1074#1072 +
        #1090#1077#1083#1100#1085#1086#1075#1086' '#1091#1095#1088#1077#1078#1076#1077#1085#1080#1103' '#1095#1077#1088#1077#1079' '#1073#1072#1085#1082#39' AS STNAME'
      'FROM COMMON C'
      'WHERE C.CSID = :CSID AND C.CTYPE = 2'
      'ORDER BY 2')
    Left = 585
    Top = 477
    ParamData = <
      item
        DataType = ftInteger
        Name = 'CSID'
        ParamType = ptUnknown
        Size = 4
      end
      item
        DataType = ftInteger
        Name = 'CSID'
        ParamType = ptUnknown
      end>
    object qComRaznesCAMOUNT: TIBBCDField
      FieldName = 'CAMOUNT'
      Origin = '"COMMON"."CAMOUNT"'
      DisplayFormat = '#,###0'
      Precision = 18
      Size = 2
    end
    object qComRaznesSTNAME: TIBStringField
      FieldName = 'STNAME'
      Origin = '"SERVICES_TYPE"."STNAME"'
      Size = 255
    end
  end
  object dsComRaznes: TDataSource
    DataSet = qComRaznes
    Left = 545
    Top = 477
  end
end
